<template>
	<view class="shopcard">
		<image class="img" :src="img" mode="aspectFill"></image>
		<view class="info">
			<view class="name">{{name}}</view>
			<view class="number">数量：{{number}}</view>
			<view class="row">
				<view class="money">￥{{money}}</view>
				<view class="state" v-if="state == 0">已选{{number}} 待支付</view>
				<view class="state" v-if="state == 1">等待发货</view>
				<view class="state" v-if="state == 2">已经发货</view>
				<view class="state" v-if="state == 3">已完成</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			img: {
				type: String
			},
			name: {
				type: String
			},
			number: {
				type: String
			},
			money: {
				type: String
			},
			state: {
				type: Number
			},
			coin: {
				type: String,
				default: 'U'
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
	.shopcard {
		padding: 20rpx;
		background-color: #141439;
		border-radius: 10rpx;
		margin-bottom: 10rpx;
		display: flex;
		
		.img {
			width: 180rpx;
			height: 180rpx;
			border-radius: 10rpx;
			display: block;
			margin-right: 30rpx;
		}
		
		.info {
			font-size: 24rpx;
			width: 420rpx;
			display: flex;
			flex-flow: column;
			justify-content: space-around;
			.name {
				font-size: 32rpx;
				width: 100%;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			.row {
				display: flex;
				justify-content: space-between;
				align-items: center;
			}
			.money {
				color: #00D388;
				font-size: 32rpx;
			}
			.state {
				color: #DDDDE2;
				display: flex;
				align-items: center;
				.btn {
					color: #fff;
					background-color: #00D388;
					font-size: 30rpx;
					padding: 16rpx;
					line-height: 1;
					margin-left: 30rpx;
				}
			}
		}
	}
</style>
